/*Lupton Teigen 2025 "Base Assumptions"
This script does the "Sixty-Mile Circles" with GOP PID as 
the dependent variable. 
Non-native Stata ADOs used: outreg2  		  
*/

clear

/*pathname needs customization for creating output table */

local destfold "E:\Dropbox\LuptonTeigen\PuddleAnalysis\gvote\"

/* Setting macro for maximum distance */

local maxdist 60

/*Uses same pooling and recoding script as main replication  
pathname needs customization */

use "E:\Dropbox\replicate_bases\ces06-22data_recoded.dta" ;

/* Sixty-Mile Circle: Testing individual base effects, looking at circles of data, `maxdist'mile circles with base at its center */
/* Assumes Stata has "outreg2" ado installed */

/* label fixing */
label variable logdistclosest "Logged Distance to Nearest Base" ;
label variable male "Male" ;
label variable inputstate_byte "State";
label variable zipblackperc "ZIP code Black %";
label variable ziphispperc "ZIP code Hispanic %";
label variable year "Year" ;


/*Dependent variable: Republican party identification   */
/***************************************************** */

#delimit ;
/*************Everybody********************** */
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if lowest<`maxdist';
outreg2 using "`destfold'output_omni_pid.xls" , replace 2aster ctitle(allwithin60) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09 ));
#delimit ;
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "Entire sample among people who live within `maxdist' miles of any installation", size(medium))
	note("Sample size: `r(N)'"  , size(small) box fcolor(gs13))
	;

graph save "Graph" "`destfold'wholesample_pid", replace ;
graph export "`destfold'wholesample_pid.png", as(png) name("Graph") replace ;

**# Bookmark #1 Maxwell AFB */
#delimit ;


logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wmaxwellafbdist<`maxdist' & (inputstate_byte==1 | inputstate_byte==12 | inputstate_byte==13);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(MxwllAFB_1) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09 ));
#delimit ;
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Maxwell AFB", size(medium))
	note("Sample size: `r(N)'"  "Maxwell AFB is about two miles NW of Mongomery's business district", size(small) box fcolor(gs13))
	;

graph save "Graph" "`destfold'maxwellafb_pid_1", replace ;
graph export "`destfold'maxwellafb_pid_1.png", as(png) name("Graph") replace ;
*/

**# Bookmark #2 Luke AFB */
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wlukeafbdist<`maxdist' & inputstate_byte==4 ;

	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(LukeAFB_2) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09 ));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Luke AFB AZ", size(medium))
	note("Sample size: `r(N)'"  "Located in suburbs of Phoenix AZ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'lukeafb_pid_2", replace ;
graph export "`destfold'lukeafb_pid_2.png", as(png) name("Graph") replace ;


**# Bookmark #3 Ft Novosel 
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortnovoseldist<`maxdist' & (inputstate_byte==1 | inputstate_byte==12 | inputstate_byte==13);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtNovo_3) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Novosel AL  FL GA", size(medium))
	note("Sample size: `r(N)'"  "Located in rural SE AL", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftnovo_pid_3", replace ;
graph export "`destfold'ftnovo_pid_3.png", as(png) name("Graph") replace ;

**# Bookmark #4 Davis Monthan AFB
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wdavismonthanafbdist<`maxdist' & (inputstate_byte==4);
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(DavisMonAFB_4) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Davis Monthan AFB AZ ", size(medium))
	note("Sample size: `r(N)'"  "Adjacent to Tucson AZ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'davismonafb_pid_4", replace ;
graph export "`destfold'davismonafb_pid_4.png", as(png) name("Graph") replace ;


**# Bookmark #5 Ft Huachuca  
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wforthuachucadist<`maxdist' & (inputstate_byte==4 | inputstate_byte==35 );
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtHuachuca_5) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Huachuca AZ NM", size(medium))
	note("Sample size: `r(N)'"  "Fairly rural, near Sierra Vista AZ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fthuachuca_pid_5", replace ;
graph export "`destfold'fthuachuca_pid_5.png", as(png) name("Graph") replace ;



**# Bookmark #6 Ft Richardson  
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortrichardsondist<`maxdist' & (inputstate_byte==2);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtRchrdsn_6) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Richardson in AK", size(medium))
	note("Sample size: `r(N)'"  "Located just outside Anchorage AK", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftrichardson_pid_6", replace ;
graph export "`destfold'ftrichardson_pid_6.png", as(png) name("Graph") replace ;*/

**# Bookmark #7 Ft Wainwright AK 
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortwainw<`maxdist' & (inputstate_byte==2);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtWnwrght_7) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Wainwright in AK", size(medium))
	note("Sample size: `r(N)'"  "Three miles from downdown Fairbanks AK 100k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftwainwright_pid_7", replace ;
graph export "`destfold'ftwainwright_pid_7.png", as(png) name("Graph") replace ;*/


**# Bookmark #8 Elmendorf AFB AK
#delimit ;

logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Welmendorfafbdist<`maxdist' & (inputstate_byte==2);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ElmdrfAFB_8) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Elmendorf AFB in AK", size(medium))
	note("Sample size: `r(N)'"  "Located just outside Anchorage AK", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'elmendorfafb_pid_8", replace ;
graph export "`destfold'elmendorfafb_pid_8.png", as(png) name("Graph") replace ;

**# Bookmark #9 Little Rock AFB AR
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wlittlerockafbdist<`maxdist' & (inputstate_byte==5 | inputstate_byte==28 | inputstate_byte==47 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(LttlRckAFB_9) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Little Rock AFB in AR MS TN", size(medium))
	note("Sample size: `r(N)'"  "Located 10 mi N of Little Rock AR", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'littlerockafb_pid_9", replace ;
graph export "`destfold'littlerockafb_pid_9.png", as(png) name("Graph") replace ;


**# Bookmark #10 Beale AFB CA NV
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wbealeafbdist<`maxdist' & (inputstate_byte==6 | inputstate_byte==32  );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(BealeAFB_10) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Beale AFB in CA NV", size(medium))
	note("Sample size: `r(N)'"  "Fairly rural outside Yuba City CA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'bealeafb_pid_10", replace ;
graph export "`destfold'bealeafb_pid_10.png", as(png) name("Graph") replace ;


**# Bookmark #11 Camp Parks CA NV
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wcampparksdist<`maxdist' & (inputstate_byte==6 | inputstate_byte==32 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(CmpPrksRFTA_11) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Camp Parks in CA", size(medium))
	note("Sample size: `r(N)'"  "Located 20 mi. E of Oakland CA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'campparks_11", replace ;
graph export "`destfold'campparks_11.png", as(png) name("Graph") replace ;


**# Bookmark #12 Camp Pendleton CA
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wcamppendletondist<`maxdist' & (inputstate_byte==6);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(CmpPndletn_12) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Camp Pendleton in CA", size(medium))
	note("Sample size: `r(N)'"  "On the SoCal coast between LA and San Diego", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'camppendleton_pid_12", replace ;
graph export "`destfold'camppendleton_pid_12.png", as(png) name("Graph") replace ;


**# Bookmark #13 Edwards AFB CA 
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wedwardsafbdist<`maxdist' & (inputstate_byte==6);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(EdwrdsAFB_13) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Edwards AFB in CA", size(medium))
	note("Sample size: `r(N)'"  "Rural 60 mi. N of LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'edwardsafb_pid_13", replace ;
graph export "`destfold'edwardsafb_pid_13.png", as(png) name("Graph") replace ;

**# Bookmark #14 Fort Hunter Liggett CA  insufficient sample size
#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wforthunterliggettdist<`maxdist' & (inputstate_byte==6);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtHntrLggtt_14) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Hunter Liggett in CA", size(medium))
	note("Sample size: `r(N)'"  "Rural halfway between SF & LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'forthunterliggett_pid_14", replace ;
graph export "`destfold'forthunterliggett_pid_14.png", as(png) name("Graph") replace ; */

**# Bookmark #15 Fort Irwin CA
/* Logit cannot get concave 
#delimit ;

logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wfortirwindist<`maxdist' & (inputstate_byte==6);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtIrwn_15) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Irwin in CA", size(medium))
	note("Sample size: `r(N)'"  "Rural LA 110 mi NE of LA & 30 mi NE of Barstow", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortirwin_pid_14", replace ;
graph export "`destfold'fortirwin_pid_14.png", as(png) name("Graph") replace ;
*/

**# Bookmark #16 Los Angeles AFB CA
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wlosangelesafbdist<`maxdist' & (inputstate_byte==6);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(LAafb_16) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around LA AFB in CA", size(medium))
	note("Sample size: `r(N)'"  "Adjacent to LAX in LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'\laafb_pid_16", replace ;
graph export "`destfold'laafb_pid_16.png", as(png) name("Graph") replace ;

**# Bookmark #17 Naval Base Coronado CA
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnbcoronadodist<`maxdist' & (inputstate_byte==6);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(NBCorondo_17) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Naval Base Coronado in CA", size(medium))
	note("Sample size: `r(N)'"  "Urban surroundings in San Diego Bay in SOCAL", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nbcoronado_pid_17", replace ;
graph export "`destfold'nbcoronado_pid_17.png", as(png) name("Graph") replace ;

**# Bookmark #18 Naval Base Loma CA   
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnblomadist<`maxdist' & (inputstate_byte==6);
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster 
ctitle(NBLoma_18) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Naval Base Loma in CA", size(medium))
	note("Sample size: `r(N)'"  "Urban surroundings in San Diego Bay in SOCAL", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nbloma_pid_18", replace ;
graph export "`destfold'nbloma_pid_18.png", as(png) name("Graph") replace ;


**# Bookmark #19 Naval Base San Diego CA   
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnbsandiegodist<`maxdist' & (inputstate_byte==6);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster 
ctitle(NB SDiego_19) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Naval Base San Diego in CA", size(medium))
	note("Sample size: `r(N)'"  "Urban surroundings in San Diego Bay in SOCAL", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nbsandiego_pid_19", replace ;
graph export "`destfold'nbsandiego_pid_19.png", as(png) name("Graph") replace ;


**# Bookmark #20 Naval Base Ventura County CA
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnbventuradist<`maxdist' & (inputstate_byte==6);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster
 ctitle(NB Vntra Cty_20) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Naval Base Ventura County in CA", size(medium))
	note("Sample size: `r(N)'"  "Sub-or Urban surroundings in 40 mi W of LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nbventuracty_pid_20", replace ;
graph export "`destfold'nbventuracty_pid_20.png", as(png) name("Graph") replace ;


**# Bookmark #21 Travis AFB CA   
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wtravisafbdist<`maxdist' & (inputstate_byte==6);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(Trvs AFB_21) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Travis AFB in CA", size(medium))
	note("Sample size: `r(N)'"  "Sort of suburban, halfway between SF and Sacramento CA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'travisafb_pid_21", replace ;
graph export "`destfold'travisafb_pid_21.png", as(png) name("Graph") replace ;


**# Bookmark #22 Vandenberg SFB CA
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wvandenbergafbdist<`maxdist' & (inputstate_byte==6);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(VndnbrgAFB_22) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Vandenberg AFB in CA", size(medium))
	note("Sample size: `r(N)'"  "Rural coastal surroundings 130 mi. N of LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'vandenbrgafb_pid_22", replace ;
graph export "`destfold'vandenbrgafb_pid_22.png", as(png) name("Graph") replace ;


**# Bookmark #23 United States Air Force Academy CO
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wusafadist<`maxdist' & (inputstate_byte==8);
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(USAFA_23) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around USAFA CO", size(medium))
	note("Sample size: `r(N)'"  "Just N of Colorado Springs CO", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'usafa_pid_23", replace ;
graph export "`destfold'usafa_pid_23.png", as(png) name("Graph") replace ;

**# Bookmark #24 Buckely SFB CO & WY
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wbuckleysfbdist<`maxdist' & (inputstate_byte==8 | inputstate_byte==56);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(BcklySFB_24) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Buckley SFB CO", size(medium))
	note("Sample size: `r(N)'"  "Suburban Denver CO", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'buckleysfb_pid_24", replace ;
graph export "`destfold'buckleysfb_pid_24.png", as(png) name("Graph") replace ;

**# Bookmark #25 Ft Carson CO
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortcarsondist<`maxdist' & (inputstate_byte==8);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtCrsn_25) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Carson CO", size(medium))
	note("Sample size: `r(N)'"  "Suburban Colorado Springs CO", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftcarson_pid_25", replace ;
graph export "`destfold'ftcarson_pid_25.png", as(png) name("Graph") replace ;

**# Bookmark #26 Peterson SFB CO
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wpetersonsfbdist<`maxdist' & (inputstate_byte==8);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(PetrsnSFB_26) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Peterson SFB CO", size(medium))
	note("Sample size: `r(N)'"  "Suburban Colorado Springs CO", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'petersonsfb_pid_26", replace ;
graph export "`destfold'petersonsfb_pid_26.png", as(png) name("Graph") replace ;


**# Bookmark #27 Schriever SFB CO
#delimit ;


logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wschrieversfbdist<`maxdist' & (inputstate_byte==8);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(SchrvrSFB_27) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Schriever SFB CO", size(medium))
	note("Sample size: `r(N)'"  "Suburban Colorado Springs CO Five mi. E of town", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'schrieversfb_pid_27", replace ;
graph export "`destfold'schrieversfb_pid_27.png", as(png) name("Graph") replace ;

**# Bookmark #28 NSB Groton CT (...and MA NH NJ NY RI VT)
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wgrotondist<`maxdist' & (inputstate_byte==9 | inputstate_byte==25 | inputstate_byte==33 | inputstate_byte==34 | inputstate_byte==36 | inputstate_byte==44 | inputstate_byte==50 );
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(NSBGrtn_28) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around NSB Groton CT", size(medium))
	note("Sample size: `r(N)'"  "Suburban CT E bank of Thames near I-95", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'NSBGrtn_pid_28", replace ;
graph export "`destfold'NSBGrtn_pid_28.png", as(png) name("Graph") replace ;


**# Bookmark #29 Dover AFB DE (...and DC MD NJ NY PA VA)
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wdoverafbdist<`maxdist' & (inputstate_byte==10 | inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==36 | inputstate_byte==42 | inputstate_byte==51 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(DoverAFB_29) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Dover AFB", size(medium))
	note("Sample size: `r(N)'"  "Suburban Dover DE with rural too", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'doverafb_pid_29", replace ;
graph export "`destfold'doverafb_pid_29.png", as(png) name("Graph") replace ;

**# Bookmark #30 JB Anacostia Bolling DC (...and DE MD NJ PA VA WV) 
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wjbanacostiabollingdist<`maxdist' & (inputstate_byte==11 | inputstate_byte==10 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==42 | inputstate_byte==51 | inputstate_byte==54 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(JBAncstBol_30) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Anacostia Bolling south corner of DC", size(medium))
	note("Sample size: `r(N)'"  "Urban DC very near MD and VA ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'jbanacostb_pid_30", replace ;
graph export "`destfold'jbanacostb_pid_30.png", as(png) name("Graph") replace ;

**# Bookmark #31 Eglin AFB (...FL & AL)
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Weglinafblatdist<`maxdist' & (inputstate_byte==1 | inputstate_byte==12 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(EglnAFB_31) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Eglin AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural beachy spot E of Pensacola FL ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'eglinafb_pid_31", replace ;
graph export "`destfold'eglinafb_pid_31.png", as(png) name("Graph") replace ;

**# Bookmark #32 MacDill AFB (...FL )
#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wmacdillafbdist<`maxdist' & (inputstate_byte==12);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(McDllAFB_32) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around MacDill AFB", size(medium))
	note("Sample size: `r(N)'"  "Urban coastal Tampa St Pete area ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'macdillafb_pid_32", replace ;
graph export "`destfold'macdillafb_pid_32.png", as(png) name("Graph") replace ;

**# Bookmark #33 Patrick SFB (...FL )

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wpatricksfbdist<`maxdist' & (inputstate_byte==12);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(PtrckSFB_33) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Patrick SFB", size(medium))
	note("Sample size: `r(N)'"  "Atlantic coastal area near Canaveral ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'patricksfb_pid_33", replace ;
graph export "`destfold'patricksfb_pid_33.png", as(png) name("Graph") replace ;

**# Bookmark #34 Tyndall AFB (...FL AL GA)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wtyndallafbdist<`maxdist' & (inputstate_byte==1 | inputstate_byte==12 | inputstate_byte==13 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(TyndllAFB_34) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Tyndall AFB", size(medium))
	note("Sample size: `r(N)'"  "Across the bay from Panama City ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'tyndallafb_pid_34", replace ;
graph export "`destfold'tyndallafb_pid_34.png", as(png) name("Graph") replace ;

**# Bookmark #35 Ft Moore (...GA AL FL) 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortmooredist<`maxdist' & (inputstate_byte==1 | inputstate_byte==12 | inputstate_byte==13 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtMoore_35) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Moore", size(medium))
	note("Sample size: `r(N)'"  "Sort of rural on GA AL border ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortmoore_pid_35", replace ;
graph export "`destfold'fortmoore_pid_35.png", as(png) name("Graph") replace ;


**# Bookmark #36 Ft Eisenhower (...GA SC) 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wforteisenhowerdist<`maxdist' & (inputstate_byte==13 | inputstate_byte==45 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtIke_36) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Eisenhower", size(medium))
	note("Sample size: `r(N)'"  "In Augusta GA near SC border ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'forteisenhower_pid_36", replace ;
graph export "`destfold'forteisenhower_pid_36.png", as(png) name("Graph") replace ;

**# Bookmark #37 Ft Stewart (...GA FL SC) 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortstewartdist<`maxdist' & 
	(inputstate_byte==12 | inputstate_byte==13 | inputstate_byte==45  );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtStwrt_37) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Stewart", size(medium))
	note("Sample size: `r(N)'"  "Rural GA 30 mi SW of Savannah ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortstewart_pid_37", replace ;
graph export "`destfold'fortstewart_pid_37.png", as(png) name("Graph") replace ;

**# Bookmark #38 Moody AFB (...GA FL)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wmoodyafbdist<`maxdist' & (inputstate_byte==12 | inputstate_byte==13 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(MoodyAFB_38) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Moody AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural GA 20 mi from FL border", size(small) box fcolor(gs13) )
	;

graph save "Graph" "`destfold'moodyafb_pid_38", replace ;
graph export "`destfold'moodyafb_pid_38.png", as(png) name("Graph") replace ;

**# Bookmark #39 Naval Sub Base Kings Bay (...GA FL SC)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnsbkingsbaydist<`maxdist' & (inputstate_byte==12 | inputstate_byte==13 | inputstate_byte==45);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(NSBKngsBay_39) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Naval Sub Base Kings Bay", size(medium))
	note("Sample size: `r(N)'"  "Coastal rural GA near FL border and JAX", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nsbkingsbay_pid_39", replace ;
graph export "`destfold'nsbkingsbay_pid_39.png", as(png) name("Graph") replace ;

**# Bookmark #40 Robins AFB (...GA AL SC)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wrobinsafbdist<`maxdist' & 
	 (inputstate_byte==1 | inputstate_byte==13 | inputstate_byte==45);

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(RbinsAFB_40) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Robins AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural GA S of Macon", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'robinsafb_pid_40", replace ;
graph export "`destfold'robinsafb_pid_40.png", as(png) name("Graph") replace ;

**# Bookmark #41 JB Pearl Harbor Hickam

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wpearlharbordist<`maxdist' & (inputstate_byte==15);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(PrlHrbrHckm_41) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Pearl Harbor Hickam", size(medium))
	note("Sample size: `r(N)'"  "Just outside Honolulu", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'pearlharbor_pid_41", replace ;
graph export "`destfold'pearlharbor_pid_41.png", as(png) name("Graph") replace ;

**# Bookmark #42 Mountain Home AFB (ID & OR) Insufficient sample size? 

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wmountainhomeafbdist<`maxdist' & (inputstate_byte==16 | inputstate_byte==41);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(MntnhomeAFB_42) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Mountain Home AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural ID 40 mi. S of Boise", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'mountainhomeafb_pid_41", replace ;
graph export "`destfold'mountainhomeafb_pid_41.png", as(png) name("Graph") replace ;


**# Bookmark #43 Scott AFB (IL MO KY)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wscottafbdist<`maxdist' & 
	 (inputstate_byte==17 | inputstate_byte==21 | inputstate_byte==29);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ScottAFB_43) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Scott AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural IL 20 mi. E of the St Louis Arch", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'scottafb_pid_43", replace ;
graph export "`destfold'scottafb_pid_43.png", as(png) name("Graph") replace ;


**# Bookmark #44 Ft Leavenworth (KS MO IA NE)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortleavenworthdist<`maxdist' & (inputstate_byte==19 | inputstate_byte==20 | inputstate_byte==29 | inputstate_byte==31);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtLvnwth_44) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Leavenworth", size(medium))
	note("Sample size: `r(N)'"  "Rural KS 20 mi. N of KC", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftleavenworth_pid_44", replace ;
graph export "`destfold'ftleavenworth_pid_44.png", as(png) name("Graph") replace ;

**# Bookmark #45 Ft Riley (KS MO NE) 

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wfortrileydist<`maxdist' &  (inputstate_byte==20 | inputstate_byte==29 | inputstate_byte==31);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtRiley_45) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Riley", size(medium))
	note("Sample size: `r(N)'"  "Rural KS", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftriley_pid_45", replace ;
graph export "`destfold'ftriley_pid_45.png", as(png) name("Graph") replace ; */

**# Bookmark #46 McConnell AFB (KS OK )

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wmcconnellafbdist<`maxdist' & (inputstate_byte==20 | inputstate_byte==40 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(McCnlAFB_46) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around McConnell AFB", size(medium))
	note("Sample size: `r(N)'"  "In Wichita KS", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'mcconnellafb_pid_46", replace ;
graph export "`destfold'mcconnellafb_pid_46.png", as(png) name("Graph") replace ;

**# Bookmark #47 Ft Campbell  (KY TN IN IL )


#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortcampbelldist<`maxdist' & (inputstate_byte==17 | inputstate_byte==18 | inputstate_byte==21 | inputstate_byte==47   );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtCmpbll_47) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Campbell", size(medium))
	note("Sample size: `r(N)'"  "Rural area on KY TN border", size(small) box fcolor(gs13) )
	;

/* Figure 2 */ 	
graph save "Graph" "`destfold'fortcampbell_pid_47", replace ;
graph export "`destfold'fortcampbell_pid_47.png", as(png) name("Graph") replace ;
graph export "`destfold'Figure_2.tiff", as(tif) replace width(2100) ; 

**# Bookmark #48 Ft Knox  (KY IN OH TN)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortknoxdist<`maxdist' & (inputstate_byte==18 | inputstate_byte==21 | inputstate_byte==39 | inputstate_byte==47 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtKnox_48) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Knox", size(medium))
	note("Sample size: `r(N)'"  "Rural KY 25 mi. S of Louisville ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortknox_pid_48", replace ;
graph export "`destfold'fortknox_pid_48.png", as(png) name("Graph") replace ;


**# Bookmark #49 Barksdale AFB  (LA TX AR)

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wbarksdaleafbdist<`maxdist' & (inputstate_byte==5 | inputstate_byte==22 | inputstate_byte==48 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(BrksdlAFB_49) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Barksdale AFB", size(medium))
	note("Sample size: `r(N)'"  "In or just outside Shreveport LA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'barksdaleafb_pid_49", replace ;
graph export "`destfold'barksdaleafb_pid_49.png", as(png) name("Graph") replace ;

**# Bookmark #50 Fort Johnson  (LA TX ) Insufficient sample size?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wfortjohnsondist<`maxdist' &  (inputstate_byte==22 | inputstate_byte==48 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtJhnsn_50) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Johnson", size(medium))
	note("Sample size: `r(N)'"  "Rural LA about halfway between Beaumont and Shreveport", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftjohnson_pid_50", replace ;
graph export "`destfold'ftjohnson_pid_50.png", as(png) name("Graph") replace ; */

**# Bookmark #51 USNA DC & NJ & Delmarva

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wusnadist<`maxdist' &  (inputstate_byte==10 | inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==42 | inputstate_byte==51 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(USNA_51) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around USNA", size(medium))
	note("Sample size: `r(N)'"  "Annapolis VA outside DC", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'usna_pid_51", replace ;
graph export "`destfold'usna_pid_51.png", as(png) name("Graph") replace ;

**# Bookmark #52 Ft Detrick MD

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortdetrickdist<`maxdist' &  (inputstate_byte==10 | inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==42 | inputstate_byte==51 | inputstate_byte==54 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtDtrick_52) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Detrick", size(medium))
	note("Sample size: `r(N)'"  "Suburban Fredrick MD", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftdetrick_pid_52", replace ;
graph export "`destfold'ftdetrick_pid_52.png", as(png) name("Graph") replace ;


**# Bookmark #53 Ft George Meade

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortgeorgemeadedist<`maxdist' &  (inputstate_byte==10 | inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==42 | inputstate_byte==51 | inputstate_byte==54 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtGMeade_53) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Greorge Meade", size(medium))
	note("Sample size: `r(N)'"  "Suburban  MD six miles S of BWI", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftgeorgemeade_pid_53", replace ;
graph export "`destfold'ftgeorgemeade_pid_53.png", as(png) name("Graph") replace ;

**# Bookmark #54 Andrews AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wandrewsafbdist<`maxdist' &  (inputstate_byte==10 | inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==42 | inputstate_byte==51 | inputstate_byte==54 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(AndrewsAFB_54) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Andrews", size(medium))
	note("Sample size: `r(N)'"  "Suburban  MD SE of DC", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'andrewsafb_pid_54", replace ;
graph export "`destfold'andrewsafb_pid_54.png", as(png) name("Graph") replace ;

**# Bookmark #55 Hanscom AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Whanscomafbdist<`maxdist' &  (inputstate_byte==9 | inputstate_byte==23 | inputstate_byte==25 | inputstate_byte==33 | inputstate_byte==44 | inputstate_byte==50 | inputstate_byte==36 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(HnscmAFB_55) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Hanscom AFB", size(medium))
	note("Sample size: `r(N)'"  "Suburban MA near Lex & Concord", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'hanscomafb_pid_55", replace ;
graph export "`destfold'hanscomafb_pid_55.png", as(png) name("Graph") replace ;

**# Bookmark #56 Ft Devens MA

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortdevensdist<`maxdist' &  (inputstate_byte==9 | inputstate_byte==23 | inputstate_byte==25 | inputstate_byte==33 | inputstate_byte==36 | inputstate_byte==44 | inputstate_byte==50 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtDvns_56) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Devens", size(medium))
	note("Sample size: `r(N)'"  "Rural MA 30 miles W of Boston", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortdevens_pid_56", replace ;
graph export "`destfold'fortdevens_pid_56.png", as(png) name("Graph") replace ;

**# Bookmark #57 Columbus AFB 

#delimit ;

logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wcolumbusafbdist<`maxdist' &  (inputstate_byte==1 | inputstate_byte==28 | inputstate_byte==13  );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ColmbusAFB_57) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Columbus AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural MS 60 miles NW of Tuscaloosa AL ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'columbusafb_pid_57", replace ;
graph export "`destfold'columbusafb_pid_57.png", as(png) name("Graph") replace ;*/

**# Bookmark #58 Keesler AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wkeeslerafbdist<`maxdist' &  (inputstate_byte==1 | inputstate_byte==12 | inputstate_byte==22 | inputstate_byte==28  );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(KsslrAFB_58) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Keesler AFB", size(medium))
	note("Sample size: `r(N)'"  "Coastal MS  next to Biloxi", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'keeslerafb_pid_58", replace ;
graph export "`destfold'keeslerafb_pid_58.png", as(png) name("Graph") replace ;

**# Bookmark #59 Ft Leonard Wood

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortleonardwooddist<`maxdist' & (inputstate_byte==29);
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtLnrdWd_59) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Leonard Wood", size(medium))
	note("Sample size: `r(N)'"  "Rural MO 120 miles SW of St Louis", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftleonardwood_pid_59", replace ;
graph export "`destfold'ftleonardwood_pid_59.png", as(png) name("Graph") replace ;

**# Bookmark #60 Whiteman AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wwhitemanafbdist<`maxdist' &  (inputstate_byte==20 | inputstate_byte==29  );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(WhtmnAFB_60) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Whiteman AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural MO 60 miles SE of KC MO", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'whitemanafb_pid_60", replace ;
graph export "`destfold'whitemanafb_pid_60.png", as(png) name("Graph") replace ;

**# Bookmark #61 Malmstrom  AFB  Insufficient sample size?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wmalmstrom<60 &  (inputstate_byte==30);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(MlmstrmAFB_61) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Malmstrom AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural MT 120 mi. N of Bozeman", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'malmstromafb_pid_61", replace ;
graph export "`destfold'malmstromafb_pid_61.png", as(png) name("Graph") replace ;


**# Bookmark #62 Offutt AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Woffuttafbdist<`maxdist' & (inputstate_byte==19 | inputstate_byte==31  );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(OffttAFB_62) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Offutt AFB", size(medium))
	note("Sample size: `r(N)'"  "Suburban NE 5 miles S of Omaha", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'offuttafb_pid_62", replace ;
graph export "`destfold'offuttafb_pid_62.png", as(png) name("Graph") replace ;

**# Bookmark #63 Creech AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wcreechafbdist<`maxdist' &  (inputstate_byte==32   );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(CreechAFB_63) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Creech AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural desert 30 miles NW of Vegas", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'creechafb_pid_63", replace ;
graph export "`destfold'creechafb_pid_63.png", as(png) name("Graph") replace ;


**# Bookmark #64 Nellis AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wnellisafbdist<`maxdist' &  (inputstate_byte==32 | inputstate_byte==4 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(NllsAFB_64) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Nellis AFB", size(medium))
	note("Sample size: `r(N)'"  "Outskirts of Vegas 7 miles from the strip", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'nellisafb_pid_64", replace ;
graph export "`destfold'nellisafb_pid_64.png", as(png) name("Graph") replace ;

**# Bookmark #65 JB McGuire Dix

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortdixdist<`maxdist' &  (inputstate_byte==9 | inputstate_byte==10 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==36 | inputstate_byte==42 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(JBDixMcG_65) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB McGuire Dix", size(medium))
	note("Sample size: `r(N)'"  "Rural Southern Jersey 30 miles E of Philly", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'mcguiredix_pid_65", replace ;
graph export "`destfold'mcguiredix_pid_65.png", as(png) name("Graph") replace ;


**# Bookmark #66 JB Lakehurst

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wjblakehurstdist<`maxdist' &  (inputstate_byte==9 | inputstate_byte==10 | inputstate_byte==24 | inputstate_byte==34 | inputstate_byte==36 | inputstate_byte==42 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(JBLkhrst_66) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Lakehurst", size(medium))
	note("Sample size: `r(N)'"  "Rural Southern Jersey 45 miles E of Philly", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'jblakehurst_pid_66", replace ;
graph export "`destfold'jblakehurst_pid_66.png", as(png) name("Graph") replace ;

**# Bookmark #67 Cannon AFB Insufficient sample size 

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wcannonafb<60 &  (inputstate_byte==35 | inputstate_byte==48 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(CannonAFB_67) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Cannon AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural NM 120 mi SW of Amarillo", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'cannonafb_pid_67", replace ;
graph export "`destfold'cannonafb_pid_67.png", as(png) name("Graph") replace ;
	
	
**# Bookmark #68 Holloman AFB Insufficient sample size?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wholloman<60 &  (inputstate_byte==35 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(HollmnAFB_68) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Holloman AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural NM 50 mi NE of Las Cruces", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'hollomanafb_pid_68", replace ;
graph export "`destfold'hollomanafb_pid_68.png", as(png) name("Graph") replace ;


**# Bookmark #69 Kirtland AFB

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wkirtlandafbdist<`maxdist' &   (inputstate_byte==35  );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(KrtlndAFB_69) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Kirtland AFB", size(medium))
	note("Sample size: `r(N)'"  "Suburban NM adjacent to Albuquerque NM", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'kirtlandafb_pid_69", replace ;
graph export "`destfold'kirtlandafb_pid_69.png", as(png) name("Graph") replace ;

**# Bookmark #70 USMA West Point


#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wusmadist<`maxdist' & (inputstate_byte==9 | inputstate_byte==34 | inputstate_byte==36 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(USMA_70) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around West Point", size(medium))
	note("Sample size: `r(N)'"  "Rural NY 50 miles N of NYC", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'usma_pid_70", replace ;
graph export "`destfold'usma_pid_70.png", as(png) name("Graph") replace ;

**# Bookmark #71 Fort Drum

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortdrumdist<`maxdist' & ( inputstate_byte==36 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtDrum_71) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Drum", size(medium))
	note("Sample size: `r(N)'"  "Rural Upstate NY 70 miles N of Syracuse", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ftdrum_pid_71", replace ;
graph export "`destfold'ftdrum_pid_71.png", as(png) name("Graph") replace ;


**# Bookmark #72 Fort Hamilton

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wforthamiltondist<`maxdist' & (inputstate_byte==9 |inputstate_byte==34 | inputstate_byte==36 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtHmltn_72) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ft Hamilton", size(medium))
	note("Sample size: `r(N)'"  "SW Brooklyn NYC at Verrazzano Narrows Bridge", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fthamilton_pid_72", replace ;
graph export "`destfold'fthamilton_pid_72.png", as(png) name("Graph") replace ;

**# Bookmark #73 Camp Lejeune

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wcamplejeunedist<`maxdist' & (inputstate_byte==37 );
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(CmpLjne_73) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Camp Lejeune", size(medium))
	note("Sample size: `r(N)'"  "Coastal N Carolina near Jacksonville 70k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'camplejeune_pid_73", replace ;
graph export "`destfold'camplejeune_pid_73.png", as(png) name("Graph") replace ;

**# Bookmark #74 Fort Liberty

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortlibertydist<`maxdist' &  (inputstate_byte==37 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtLbrty_74) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Liberty née Fort Bragg", size(medium))
	note("Sample size: `r(N)'"  "Suburban bordering Fayetteville NC 200k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortliberty_pid_74", replace ;
graph export "`destfold'fortliberty_pid_74.png", as(png) name("Graph") replace ;

**# Bookmark #75  Seymour Johnson AFB


#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wseymourjohnsonafbdist<`maxdist' & (inputstate_byte==37 ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(SymrJhnsnAFB_75) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Seymour Johnson AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural bordering Goldsboro NC 30k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'seymourjohnsonafb_pid_75", replace ;
graph export "`destfold'seymourjohnsonafb_pid_75.png", as(png) name("Graph") replace ;


**# Bookmark #76 Grand Forks AFB Insufficient sample size?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wgrandfork<60 &  (inputstate_byte==27 | inputstate_byte==38 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(GrndFrksAFB_76) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Grand Forks AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural ND 15 mi. W of Grand Forks", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'grandforksafb_pid_75", replace ;
graph export "`destfold'grandforksafb_pid_75.png", as(png) name("Graph") replace ;	
	
	
	
**# Bookmark #77 Minot AFB Insufficient sample size ?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wminotafbdist<60 &  (inputstate_byte==27 | inputstate_byte==38 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(MinotAFB_77) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Minot AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural ND 100 mi. N of Bismarck", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'minotafb_pid_77", replace ;
graph export "`destfold'minotafb_pid_77.png", as(png) name("Graph") replace ;	

**# Bookmark #78 Wright Patterson AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wwrightpattersonafbdist<`maxdist' & (inputstate_byte==39 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(WrtPattAFB_78) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Wright Patterson AFB", size(medium))
	note("Sample size: `r(N)'"  "Suburban adjacent to Dayton OH 140k & 40 m N of Cinncinati OH 300k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'wrightpattersonafb_pid_78", replace ;
graph export "`destfold'wrightpattersonafb_pid_78.png", as(png) name("Graph") replace ;

/* #79 Altus AFB Insufficient sample size */

**# Bookmark #80 Fort Sill 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortsilldist<`maxdist' & (inputstate_byte==40 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtSill_80) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Sill", size(medium))
	note("Sample size: `r(N)'"  "Rural adjacent to Lawton OK 90k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortsill_pid_80", replace ;
graph export "`destfold'fortsill_pid_80.png", as(png) name("Graph") replace ; */


**# Bookmark #81 Tinker AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wtinkerafbdist<`maxdist' & (inputstate_byte==40 ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(TnkrAFB_81) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Tinker AFB", size(medium))
	note("Sample size: `r(N)'"  "Urban bordering OK City 700k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'tinkerafb_pid_81", replace ;
graph export "`destfold'tinkerafb_pid_81.png", as(png) name("Graph") replace ;

**# Bookmark #82 Vance AFB Insufficient samples size?

#delimit ;
logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wvanceafb<`maxdist' &  (inputstate_byte==40);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(VanceAFB_82) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Vance AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural OK 60 mi. N of OKC", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'vanceafb_pid_82", replace ;
graph export "`destfold'vanceafb_pid_82.png", as(png) name("Graph") replace ;	


**# Bookmark #83 Fort Jackson

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortjacksondist<`maxdist' & (inputstate_byte==45 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtJcksn_83) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Jackson", size(medium))
	note("Sample size: `r(N)'"  "Adjacent to Columbia SC 140k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortjackson_pid_83", replace ;
graph export "`destfold'fortjackson_pid_83.png", as(png) name("Graph") replace ;

**# Bookmark #84 JB Charleston

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wjbcharlestondist<`maxdist' & (inputstate_byte==45 | inputstate_byte==13 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(JBChrlstn_84) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Charleston", size(medium))
	note("Sample size: `r(N)'"  "10 mi away from Charleston SC 150k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'jbcharleston_pid_84", replace ;
graph export "`destfold'jbcharleston_pid_84.png", as(png) name("Graph") replace ;

**# Bookmark #85 Shaw AFB

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wshawafbdist<`maxdist' & (inputstate_byte==45 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ShawAFB_85) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Shaw AFB", size(medium))
	note("Sample size: `r(N)'"  "30 mi E of Columbia SC 140k among many small towns", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'shawafb_pid_85", replace ;
graph export "`destfold'shawafb_pid_85.png", as(png) name("Graph") replace ;


**# Bookmark #86 Ellsworth AFB */

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wellsworthafbdist<`maxdist' & (inputstate_byte==46 ) ;

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(EllswrthAFB_86) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Ellsworth AFB", size(medium))
	note("Sample size: `r(N)'"  "8 mi E of Rapid City SD 80k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'ellsworthafb_pid_86", replace ;
graph export "`destfold'ellsworthafb_pid_86.png", as(png) name("Graph") replace ;


**# Bookmark #87 Arnold AFB

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Warnoldafbdist<`maxdist' & (inputstate_byte==47 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ArnldAFB_87) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Arnold AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural roughly halfway between Chattanooga and Nashville TN", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'arnoldafb_pid_87", replace ;
graph export "`destfold'arnoldafb_pid_87.png", as(png) name("Graph") replace ; 


**# Bookmark #88 Dyess AFB 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wdyessafbdist<`maxdist' & (inputstate_byte==48 );	
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(DyessAFB_88) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Dyess AFB", size(medium))
	note("Sample size: `r(N)'"  "Ruralish TX outside of Abilene 150k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'dyessafb_pid_88", replace ;
graph export "`destfold'dyessafb_pid_88.png", as(png) name("Graph") replace ; 

**# Bookmark #89 Fort Bliss

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortblissdist<`maxdist' & (inputstate_byte==35 | inputstate_byte==48 ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtBliss_89) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Bliss", size(medium))
	note("Sample size: `r(N)'"  " Within El Paso TX 700k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortbliss_pid_89", replace ;
graph export "`destfold'fortbliss_pid_89.png", as(png) name("Graph") replace ;


**# Bookmark #90 Fort Cavazos

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortcavazosdist<`maxdist' & (inputstate_byte==48 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtCvzs_90) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Cavazos née Fort Hood", size(medium))
	note("Sample size: `r(N)'"  "Borders Killeen TX 150K halfway between Waco and Austin", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortcvazos_pid_90", replace ;
graph export "`destfold'fortcvazos_pid_90.png", as(png) name("Graph") replace ;


**# Bookmark #91 Goodfellow AFB


#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wgoodfellowafbdist<`maxdist' & (inputstate_byte==48 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(GdfllwAFB_91) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Goodfellow AFB", size(medium))
	note("Sample size: `r(N)'"  "Adjacent to San Angelo TX 100k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'goodfellowafb_pid_91", replace ;
graph export "`destfold'goodfellowafb_pid_91.png", as(png) name("Graph") replace ;


**# Bookmark #92 Fort Sam Houston */

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortsamdist<`maxdist' & (inputstate_byte==48 ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtSmHstn_92) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Sam Houston", size(medium))
	note("Sample size: `r(N)'"  "Within San Antonio TX 1.5m ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortsamhouston_pid_92", replace ;
graph export "`destfold'fortsamhouston_pid_92.png", as(png) name("Graph") replace ;

**# Bookmark #93 Lackland AFB


#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wlacklandafbdist<`maxdist' & (inputstate_byte==48 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(LcklndAFB_93) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Lackland AFB", size(medium))
	note("Sample size: `r(N)'"  "Within San Antonio TX 1.5m ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'lacklandafb_pid_93", replace ;
graph export "`destfold'lacklandafb_pid_93.png", as(png) name("Graph") replace ;

**# Bookmark #94 Randolph AFB  */

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wrandolphafbdist<`maxdist' & (inputstate_byte==48 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(RndlphAFB_94) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Randolph AFB", size(medium))
	note("Sample size: `r(N)'"  "Within San Antonio TX 1.5m ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'randolphafb_pid_94", replace ;
graph export "`destfold'randolphafb_pid_94.png", as(png) name("Graph") replace ;

**# Bookmark #98 Sheppard AFB  Insufficient sample size?

#delimit ;

logit goppid_l 
	c.logdistclosest
	whitenonhisp
	evangc
	male
	/*
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year */
	i.inputstate_byte if Wsheppardafb<`maxdist' &  (inputstate_byte==40 | inputstate_byte==48);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(ShpprdAFB_98) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Sheppard AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural TX 100 mi. NW of Ft Worth", size(small) box fcolor(gs13) )
	;
graph save "Graph" "`destfold'sheppardafb_pid_82", replace ;
graph export "`destfold'sheppardafb_pid_82.png", as(png) name("Graph") replace ;	


**# Bookmark #99 Hill AFB

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Whillafbdist<`maxdist' & ( inputstate_byte==49 )  ;
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(HillAFB_99) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Hill AFB", size(medium))
	note("Sample size: `r(N)'"  "20 mi N of Salt Lake City UT", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'hillafb_pid_99", replace ;
graph export "`destfold'hillafb_pid_99.png", as(png) name("Graph") replace ;


**# Bookmark #100 Fort Belvoir  */

#delimit ;
#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortbelvoirdist<`maxdist' & ( inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==51 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtBlvoir_100) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Belvoir", size(medium))
	note("Sample size: `r(N)'"  "8 mi S of the Pentagon in suburban VA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortbelvoir_pid_100", replace ;
graph export "`destfold'fortbelvoir_pid_100.png", as(png) name("Graph") replace ;


**# Bookmark #101 Fort Gregg-Adams

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortgreggadamsdist<`maxdist' & (  inputstate_byte==51 ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtGrggAdms_101) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Gregg-Adams née Fort Lee", size(medium))
	note("Sample size: `r(N)'"  "20 mi S of Richmond VA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortgreggadams_pid_101", replace ;
graph export "`destfold'fortgreggadams_pid_101.png", as(png) name("Graph") replace ;


**# Bookmark #102 Fort Myer-Henderson Hall

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortmyerdist<`maxdist' & (  inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==51  ) ;
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtMyer_102) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Myer-Henderson", size(medium))
	note("Sample size: `r(N)'"  "Adjacent to Arlington Cemetery VA DC suburbs", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortmyer_pid_102", replace ;
graph export "`destfold'fortmyer_pid_102.png", as(png) name("Graph") replace ;


**# Bookmark #104 Langley AFB */

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wlangleyafbdist<`maxdist' & (inputstate_byte==51 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(LnglyAFB_104) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Langley AFB", size(medium))
	note("Sample size: `r(N)'"  "Cheasapeake Bay 15 mi N of Norfolk VA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'langleyafb_pid_104", replace ;
graph export "`destfold'langleyafb_pid_104.png", as(png) name("Graph") replace ;


**# Bookmark #105 Fort Eustis

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wforteustisdist<`maxdist' & (inputstate_byte==51 );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtEusts_105) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Eustis", size(medium))
	note("Sample size: `r(N)'"  "Cheasapeake Area 25 mi NW of Norfolk VA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'forteustis_pid_105", replace ;
graph export "`destfold'forteustis_pid_105.png", as(png) name("Graph") replace ;


**# Bookmark #106 Fort Story */

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortstorydist<`maxdist' & (inputstate_byte==51 );
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtStory_106) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort Story", size(medium))
	note("Sample size: `r(N)'"  "Virginia Beach 15 mi E of Norfolk VA", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortstory_pid_106", replace ;
graph export "`destfold'fortstory_pid_106.png", as(png) name("Graph") replace ;


**# Bookmark #108 Quantico Marine Corps Base

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wmcbquanticodist<`maxdist' & (   inputstate_byte==11 | inputstate_byte==24 | inputstate_byte==51  );
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(QnticoMCB_108) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Quantico Marine Corps Base", size(medium))
	note("Sample size: `r(N)'"  "On Potomac 30 mi S of Pentagon VA", size(small) box fcolor(gs13) )
	;
	/* Figure 3 */
	
graph save "Graph" "`destfold'mcbquantico_pid_108", replace ;
graph export "`destfold'mcbquantico_pid_108.png", as(png) name("Graph") replace ;
graph export "`destfold'Figure_3.tiff", as(tif) replace width(2100);

**# Bookmark #109 Fairchild AFB 

#delimit ;
logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfairchildafbdist<`maxdist' & ( inputstate_byte==16 | inputstate_byte==53 ) ;
 
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FrchldAFB_109) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fairchild AFB", size(medium))
	note("Sample size: `r(N)'"  "10 mi W of Spokane WA 230K", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fairchildafb_pid_109", replace ;
graph export "`destfold'fairchildafb_pid_109.png", as(png) name("Graph") replace ;


**# Bookmark #110 JB Lewis-McChord

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wjblewismcchorddist<`maxdist' & (inputstate_byte==53 );

outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(JBLwsMcCrd_110) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around JB Lewis-McChord", size(medium))
	note("Sample size: `r(N)'"  "Borders Tacoma WA 220k", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'jblewismcchord_pid_110", replace ;
graph export "`destfold'jblewismcchord_pid_110.png", as(png) name("Graph") replace ;


**# Bookmark #112 Fort McCoy 

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfortmccoydist<`maxdist' & (inputstate_byte==55 | inputstate_byte==27);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FtMcCoy_112) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around Fort McCoy", size(medium))
	note("Sample size: `r(N)'"  "Rural Western WI 90 mi NW of Madison", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fortmccoy_pid_112", replace ;
graph export "`destfold'fortmccoy_pid_112.png", as(png) name("Graph") replace ; */


**# Bookmark #113 F E Warren AFB

#delimit ;

logit goppid_l 
	c.logdistclosest 
	svyk
	whitenonhisp
	ba
	male
	vet
	evangc
	marrspouse
	i.bage
	zipblackperc
	ziphispperc
	i.dens_q
	i.year 
	i.inputstate_byte if Wfewarrenafbdist<`maxdist' & (inputstate_byte==8 | inputstate_byte==56);
	
outreg2 using "`destfold'output_omni_pid.xls" , append 2aster ctitle(FEWrrnAFB_113) bdec(2) excel lab;
margins, at(logdistclosest=(1 2 2.7 3.4 4.09));
marginsplot, 
	xdimension(logdist) 
	recastci(rspike) 
	ciopts(lwidth(vthin)) 
	xscale(log) 
	xlabel(1 "3" 2 "8" 2.7 "15" 3.4 "30" 4.09 "60") 
	xtitle("Logged distance from base", size(small)) 
	ylabel(, angle(horizontal) format(%5.2f)) 
	ytitle("Likelihood of GOP Party ID", size(small)) 
	scheme(s1mono) 
	title("GOP Party ID" "`maxdist' Mile Circle Around F E Warren AFB", size(medium))
	note("Sample size: `r(N)'"  "Rural Wyoming bordering Cheyenne 65k ", size(small) box fcolor(gs13) )
	;
	
graph save "Graph" "`destfold'fewarrenafb_pid_113", replace ;
graph export "`destfold'fewarrenafb_pid_113.png", as(png) name("Graph") replace ;
